<%@include file="/init.jsp"%>

<%
	ResultRow row = (ResultRow) request
			.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
	PRRegistration registration = (PRRegistration) row.getObject();
	long groupId = themeDisplay.getLayout().getGroupId();
	String name = PRRegistration.class.getName();
	out.print(name);
	String primKey = String.valueOf(registration.getPrimaryKey());
%>

<liferay-ui:icon-menu>
	<c:if
		test="<%=permissionChecker.hasPermission(groupId, name,
							primKey, ActionKeys.UPDATE)%>">
		<portlet:actionURL name="viewRegistration" var="viewRegistrationURL">
			<portlet:param name="resourcePrimKey" value="<%=primKey%>" />
		</portlet:actionURL>
		<liferay-ui:icon image="view" label="View Registration"
			url="<%=viewRegistrationURL.toString()%>" />
	</c:if>

	<c:if
		test="<%=permissionChecker.hasPermission(groupId, name,
							primKey, ActionKeys.PERMISSIONS)%>">
		<liferay-security:permissionsURL
			modelResource="<%=PRRegistration.class.getName()%>"
			modelResourceDescription="<%=registration.getSerialNumber()%>"
			resourcePrimKey="<%=primKey%>" var="permissionsURL" />
		<liferay-ui:icon image="permission" url="<%=permissionsURL%>" />
	</c:if>

</liferay-ui:icon-menu>